using System;
using System.Collections.Generic;
using System.Text;
using System.Xml.Serialization;
using System.Xml.Schema;

namespace R2ML
{
    
    public class TriggeringEvent
    {
        [System.Xml.Serialization.XmlElementAttribute("MessageEventExpression")]
        public MessageEventExpression messageEventExpression
        {
            get
            {
                return _messageEventExpression;
            }
            set
            {
                _messageEventExpression = value;
            }
        }

        [XmlType(Namespace = "http://www.rewerse.net/I1/2006/R2ML")]
        [XmlRoot("MessageEventExpression", Namespace = "http://www.rewerse.net/I1/2006/R2ML")]
        public class MessageEventExpression
        {
            [System.Xml.Serialization.XmlAttribute("eventType", Namespace = "http://www.rewerse.net/I1/2006/R2ML", Form = XmlSchemaForm.Qualified)]
            public String eventType;

            [System.Xml.Serialization.XmlAttribute("sender", Namespace = "http://www.rewerse.net/I1/2006/R2ML", Form = XmlSchemaForm.Qualified)]
            public String sender;

            [System.Xml.Serialization.XmlArray("arguements")]
            [System.Xml.Serialization.XmlArrayItem("ObjectVariable")]
            public ObjectVariable[] arguements;
        }

        [System.Xml.Serialization.XmlIgnore()]
        private MessageEventExpression _messageEventExpression;
    }

    ///<remarks>
    ///<r2ml:triggeringEvent>
    ///<r2ml:MessageEventExpression r2ml:eventType="alert" r2ml:startTime="2006-03-21T09:00:00" r2ml:duration="P0Y0M0DT0H0M0S" r2ml:sender="http://www.mywebsite.org">
    ///<r2ml:arguments>
    ///<r2ml:ObjectVariable r2ml:name="car" r2ml:classID="RentalCar"/>
    ///<r2ml:ObjectVariable r2ml:name="customer" r2ml:classID="Customer"/>
    ///</r2ml:arguments>
    ///</r2ml:MessageEventExpression>
    ///</r2ml:triggeringEvent>
    ///</remarks>
}
